/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.vacoor.ui.qq.input;

import java.awt.Color;
import java.awt.GridLayout;

import javax.swing.ImageIcon;
import javax.swing.JPanel;
import javax.swing.UIManager;

import org.vacoor.ui.qq.combobox.QQComItem;
import org.vacoor.ui.qq.combobox.QQComboBox;
import org.vacoor.ui.qq.password.QQPasswordField;


/**
 *
 * @author Vacoor
 */
public class QQLoginInput extends JPanel {

	private static final long serialVersionUID = 1L;
	QQComboBox com;
    QQComItem[] items;
    QQPasswordField passField;

    public QQLoginInput() {
        setFeel();
        items = new QQComItem[]{
            new QQComItem(
            		new ImageIcon(this.getClass().getClassLoader().getResource("images/Head/001.png")),
            		"ロボット", 
            		"827257689"),
            new QQComItem(
            		new ImageIcon(getClass().getClassLoader().getResource("images/Head/002.png")),
            		"碧宇扬帆",
            		"312557602"),
            new QQComItem(
            		new ImageIcon(getClass().getClassLoader().getResource("images/Head/003.png")), 
            		"打媳妇的妻管严", 
            		"939785099"),
            new QQComItem(
            		new ImageIcon(getClass().getClassLoader().getResource("images/Head/004.png")), 
            		"だい先生灬♂", 
            		"3442537689"),
            new QQComItem(
            		new ImageIcon(getClass().getClassLoader().getResource("images/Head/005.png")), 
            		"VStudio™", 
            		"587792735"),
            new QQComItem(
            		new ImageIcon(getClass().getClassLoader().getResource("images/Head/006.png")), 
            		"2724576189"),
            new QQComItem("457634389")};
        com = new QQComboBox(items);
        passField = new QQPasswordField();
        this.setLayout(new GridLayout(2, 1, 0, 10));
        this.setBackground(Color.WHITE);
        com.setEditable(true);
        com.setFieldIconShow(false);
        this.add(com);
        this.add(passField);
    }

    public static JPanel createMInput() {
        return new QQLoginInput();
    }

    //设置外观风格
    private void setFeel() {
        try {
//            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            System.out.println("异常:" + e);
        }
    }
}
